<template>
    <div>{{ msg }}</div>
    <button @click="onUpdata">更新了</button>
</template>

<script setup lang="ts">
    defineProps<{ msg?: string }>()
    const $emit = defineEmits<{
        (event: 'updata', param: string): void
    }>()
    const onUpdata = () => {
        $emit('updata', '222222')
    }
</script>
<style></style>
